<?php $i = 0; ?>
<?php foreach($allnews as $row):?>
<?php $i = $i +1; ?>
<?php if($i == 1):?>
<div class="banner sidebar-banner clearfix">
<!--    <h2 class="clearfix">
        <a href="<?php echo site_url('tin_chi_tiet/'.mb_strtolower(url_title(removesign($row->title.'-'.$row->id)))).'.html'?>" title="<?php echo $row->title?>"><?php echo $row->title?></a>
    </h2> -->
    <div class="banner-img clearfix">
        <div class="img-wrapper">
            <a href="<?php echo site_url('tin_chi_tiet/'.mb_strtolower(url_title(removesign($row->title.'-'.$row->id)))).'.html'?>" title="<?php echo $row->title?>">
                <img src="<?php echo base_url('src/news/'.$row->images);?>" alt="<?php echo "iColorvn.vn - ".$row->title?>" height="210" width="375">
            </a>
        </div>
        <div class="banner-description clearfix"><a href="<?php echo site_url('tin_chi_tiet/'.mb_strtolower(url_title(removesign($row->title.'-'.$row->id)))).'.html'?>" title="<?php echo $row->title?>"><?php echo $row->title?></a>
        </div>
    </div>
</div>
<?php else: ?>
<div class="news-list-wrapper clearfix">
    <ul class="news-list nolist clearfix">
        <li class="clearfix">
            <div class="news-avatar-wrapper">
                <a href="<?php echo site_url('tin_chi_tiet/'.mb_strtolower(url_title(removesign($row->title.'-'.$row->id)))).'.html'?>" title="<?php echo "iColorvn.vn - ".$row->title?>">
                    <img src="<?php echo base_url('src/news/thumb_'.$row->images);?>" alt="<?php echo "iColorvn.vn - ".$row->title?>" height="50" width="60">
                </a>
            </div>
            <div class="news-teaser-wrapper">
                <div class="news-teaser clearfix">
                    <a href="<?php echo site_url('tin_chi_tiet/'.mb_strtolower(url_title(removesign($row->title.'-'.$row->id)))).'.html'?>" title="<?php echo "iColorvn.vn - ".$row->title?>"><?php echo $row->title?></a>
                </div>
                <div class="news-meta clearfix"><?php echo $row->createdate; ?></div>
                    
            </div>
        </li>
    </ul>
    <div class="view-all">
        <a href="<?php echo site_url('tin_chi_tiet/'.mb_strtolower(url_title(removesign($row->title.'-'.$row->id)))).'.html'?>" title="Xem tất cả tin tức">Chi tiết<span style="font-size:15px">»</span></a>
    </div>
</div>
<?php endif; ?>
<?php endforeach; ?>



<!--<div class="ads-wrapper clearfix">
    <div class="title-wrapper clearfix">
        <h2><a href="<?php echo site_url(); ?> rao-vat-may-cu" title="Rao vặt, máy cũ">Rao vặt, máy cũ</a></h2>

    </div>
    <ul class="ads-list nolist clearfix">
        <li><a href="<?php echo site_url(); ?> rao-vat-may-cu/dtdd/sony-xperia-m-den-dung-15-ngay-moi-ngon-3tr9-1004147" title="Sony Xperia M (đen) dùng 15 ngày mới ngon 3tr9 - Hà Nội"><h3>Sony xperia m (đen) dùng 15 ngày mới...</h3><cite class="price">3.900.000₫</cite></a></li><li><a href="<?php echo site_url(); ?> rao-vat-may-cu/dtdd/sony-arc-s-1003903" title="Sony ARC S - Hà Nội"><h3>Sony arc s</h3><cite class="price">3.200.000₫</cite></a></li><li><a href="<?php echo site_url(); ?> rao-vat-may-cu/dtdd/lumia-720-1003876" title="Lumia 720 . - Hà Nội"><h3>Lumia 720 .</h3><cite class="price">3.500.000₫</cite></a></li><li><a href="<?php echo site_url(); ?> rao-vat-may-cu/may-tinh-bang/may-tinh-bang-acer-iconia-a1-811-8-3g-16gb-1003732" title="Máy tính bảng acer iconia a1-811 8” 3g 16gb - Hà Nội"><h3>Máy tính bảng acer iconia a1-811 8” 3g...</h3><cite class="price">3.900.000₫</cite></a></li><li><a href="<?php echo site_url(); ?> rao-vat-may-cu/dtdd/iphone-3gs-8gb-ban-quoc-te-chuan-1003695" title="Iphone 3GS - 8GB bản Quốc tế chuẩn - Hà Nội"><h3>Iphone 3gs - 8gb bản quốc tế chuẩn</h3><cite class="price">1.700.000₫</cite></a></li>
    </ul>
</div>
<div class="form-wrapper create-ads-form-wrapper clearfix" id="form-wrapper">
    <div class="input-wrapper clearfix">
        <input placeholder="Bạn muốn rao bán gì?" onclick="QuickPost2()" name="ads-name" class="input ads-name" type="text">
        <input value="Đăng tin" onclick="QuickPost2()" name="ads-submit" class="submit-button ads-submit" type="button">

    </div>
    <div class="loader-create-classified"></div>
    <div id="showmessage"></div>
    <div class="ads-form-wrapper clearfix">
    </div>
</div>-->



<!--<div class="ads-wrapper clearfix">
    <div class="title-wrapper clearfix">
        <h2>Sản phẩm nhiều người quan tâm</h2>
    </div>
    <div id="tags">
        <ul>
            <li class="tag1"><a href="<?php echo site_url(); ?> dtdd/nokia-lumia-920">Lumia 920</a></li>
            <li class="tag2"><a href="<?php echo site_url(); ?> dtdd/nokia-lumia-520">Lumia 520</a></li>
            <li class="tag3"><a href="<?php echo site_url(); ?> dtdd/samsung-galaxy-note-3">Galaxy Note 3</a></li>
            <li class="tag2"><a href="<?php echo site_url(); ?> iphone-4s">iPhone 4s</a></li>
            <li class="tag4"><a href="<?php echo site_url(); ?> dtdd/htc-one-max">HTC One Max</a></li>
            <li class="tag1"><a href="<?php echo site_url(); ?> dtdd/nokia-lumia-1520">Lumia 1520</a></li>
            <li class="tag5"><a href="<?php echo site_url(); ?> iphone-5s">iPhone 5S</a></li>
            <li class="tag1"><a href="<?php echo site_url(); ?> dtdd/samsung-galaxy-trend-s7560">Galaxy Trend</a></li>
            <li class="tag2"><a href="<?php echo site_url(); ?> dtdd/sony-xperia-z1">Xperia Z1</a></li>
            <li class="tag5"><a href="<?php echo site_url(); ?> iphone-6">iPhone 6</a></li>
            <li class="tag1"><a href="<?php echo site_url(); ?> dtdd/nokia-lumia-1020">Lumia 1020</a></li>
            <li class="tag3"><a href="<?php echo site_url(); ?> ipad-air">iPad Air</a></li>
            <li class="tag4"><a href="<?php echo site_url(); ?> dtdd/iphone-5">iPhone 5</a></li>
            <li class="tag1"><a href="<?php echo site_url(); ?> ipad-4">iPad 4</a></li>
            <li class="tag5"><a href="<?php echo site_url(); ?> galaxy-s5">Galaxy S5</a></li>
            <li class="tag1"><a href="<?php echo site_url(); ?> dtdd/htc-one">HTC One</a></li>
            <li class="tag2"><a href="<?php echo site_url(); ?> ipad-mini">iPad Mini</a></li>
        </ul>
    </div>
</div> -->
<div class="clearfix">
</div>